#pragma once
#include "../IGameState.h"

#include "MapImport.h"
#include "NewtonEngine.h"
#include "EntityManager.h"


/**
==================================================
InGameState - as you guessed this represents anything
that would run when the game is running
==================================================
*/
class InGameState : public IGameState
{
public:
    InGameState(void);
    /**
        Initialize the game world
    */
    int Init();

	/**
        Start, reinit anything that may have been
        uninitiliazed leaving the state
    */
	int Start();

    /**
        Update the world by a frame tick
    */
	void Update(float dt);
    /**
        Leave this game state
    */
	void Exit();

    /**
        Destroy and cleanup this state
    */
	void Shutdown();

    /** Get the Entity Manager */
    EntityManager* GetEntMng() { return &m_entMng; };

private:
    /** Map change */
    bool CheckMapChange();

    MapImport       m_mapImporter;      // parse the maps
    NewtonEngine    m_physEngine;       // newton engine hook
    EntityManager   m_entMng;           // List of Entities
public:
    virtual ~InGameState(void);
};
